﻿/*
   Copyright 2012 University of Southampton

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
*/

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace uk.ac.soton.ses.DAL
{

    /// <summary>
    /// Exception thrown when the experiment can't be found or a valid ID was not passed
    /// </summary>
    public class ExperimentLoadException : Exception
    {
        /// <summary>
        /// Initializes a new instance of the exception with a specified message
        /// </summary>
        /// <param name="message">The message that describes the error.</param>
        public ExperimentLoadException(string message)
            : base(message)
        {
        }
    }

    /// <summary>
    /// Exception thrown when the experiment can't be saved
    /// </summary>
    public class ExperimentSaveException : Exception
    {
        /// <summary>
        /// Initializes a new instance of the exception with a specified message
        /// </summary>
        /// <param name="message">The message that describes the error.</param>
        public ExperimentSaveException(string message)
            : base(message)
        {
        }
    }


    /// <summary>
    /// Exception thrown when user does not have access to the experiment
    /// </summary>
    public class ExperimentAccessDeniedException : Exception
    {
        /// <summary>
        /// Initializes a new instance of the exception with a specified message
        /// </summary>
        /// <param name="message">The message that describes the error.</param>
        public ExperimentAccessDeniedException(string message)
            : base(message)
        {
        }
    }

    /// <summary>
    /// Exception thrown when the file system watcher configuration could not be found.
    /// </summary>
    public class ConfigurationNotFoundException : Exception
    {
        /// <summary>
        /// Initializes a new instance of the exception with a specified message
        /// </summary>
        /// <param name="message">The message that describes the error.</param>
        public ConfigurationNotFoundException(string message)
            : base(message)
        {
        }
    }
}
